package uk.ac.cam.djjb2.mygame;

import java.util.HashMap;

public class TileSet {
	private HashMap<Integer, Tile> tiles;
	
	public TileSet() {
		tiles = new HashMap<Integer, Tile>();
	}
	
	public void addTile(Tile tile) {
		int id = tile.getId();
		if (tiles.containsKey(id))
			System.err.println("Tile ID clash");
		
		tiles.put(id, tile);
	}
	
	public Tile getTile(int id) {
		return tiles.get(id);
	}
}
